<div class="wrap">
	<div id="ajaxResponse1" class="ajaxResponse" {if $smarty.cookies.message != NULL}style="display:block"{/if}>{if $smarty.cookies.message != NULL}{$smarty.cookies.message}{/if}</div>
	<h2>Seite des Men&uuml;s "{$CATNAME->cat_name}" editieren</h2>
	<form name="editpage" id="editpage" method="post" action="?{$smarty.server.QUERY_STRING}" onsubmit = "return onPageSubmit('editpage', 'ajaxResponse', 'type', 'page_content');">
		<input type="hidden" id="act" name="act" value="editpage"/>
        <input type="hidden" id="type" name="type" value="">
        <input type="hidden" id="getlist" name="getlist" value="{$smarty.get.list}"/>
        <input type="hidden" id="parent_id" name="parent_id" value="{$smarty.get.catid}">
        {if $smarty.get.act eq 'assign_page'}
            <input type="hidden" id="id" name="id" value="{$THEPAGE->page_id}"/>
            <input type="hidden" id="cat_id" name="cat_id" value="{$smarty.get.id}"/>
        {else}
        	<input type="hidden" id="id" name="id" value="{$smarty.get.id}"/>
        {/if}
		<input type="hidden" id="get_type" name="get_type" value="{$smarty.get.sub1}">
		<table width="100%">
		<tr valign="top">
			<td width="60%">
				<p>
				<label for="page_name">Seitennamen:</label><br />
				<input name="page_name" id="page_name" type="text" value="{$THEPAGE->page_name}" size="100px" />
				</p>
				<label for="page_content">Seiteninhalt:</label><br />
				<div>
					<textarea id="page_content" name="page_content" rows="15" cols="10" style="width: 100%">{$THEPAGE->page_content}</textarea>
				</div>
				<p class="submit" align = "right">
                	<input type="button" name="button" value="Seite l&ouml;schen &raquo;" 
					onclick="onDeletePage('?{$smarty.server.QUERY_STRING}', '{$smarty.get.id}', 'ajaxResponse_page','?module={$smarty.get.module}{if $smarty.get.subcat}&subcat={$smarty.get.subcat}&catid={$smarty.get.catid}{/if}')"/>
					<input type="submit" name="button" value="speichern und weitermachen &raquo;" 
					onclick="$('type').value='ajax';"/>
					<input type="submit" name="submit" value="speichern &raquo;" 
					onclick="$('type').value='';"/>
				</p>
			</td>
		</tr>
		</table>
	</form>
</div>